
<div class="row">
  <div class="col-md-3">
    <div class="well ticket-contact-form">
      <form action="/clients/<%= client.id %>" method="post" class="" role="form">
        <h3>我的联系方式</h3>
        <hr>
        <div class="form-group">
          <label class="">用户名</label>
          <div class="">
            <p class=""><%= client.username %></p>
          </div>
        </div>
        <%if(client.email){%>
        <div class="form-group">
          <label class="">邮箱</label>
          <div class="">
            <p class=""><%= client.email %></p>
          </div>
        </div>
        <div class="form-group">
          <label for="form-ticket-contact-qq" class="">QQ</label>
          <input type="number" class="form-control qq-input" id="form-ticket-contact-qq" value="<%= client.qq %>" name="qq" placeholder="输入 QQ 号">
        </div>
        <div class="form-group">
          <input class="btn btn-default contact-save-btn" type="submit" value="保存">
        </div>
        <%}%>
      </form>
    </div>

    <% if(isAdmin){ %>
    <div>
      <p>添加管理员</p>
      <form action="/admin" method="post">
        <input type="text" class="input" id="admin-username-input" value="" name="username" placeholder="输入用户名添加或删除">
        <input type="submit" class="btn btn-default" value="提交">
      </form>
    </div>
    <% } %>
  </div>
  <!-- .col-md-3 -->
  <div class="col-md-9">
    <table class="table table-borderless table-sortable">
      <thead>
      <tr>
        <th data-sort="string">工程师</th>
        <th data-sort="string">负责模块</th>
        <th data-sort="string">邮箱</th>
        <th>QQ</th>
      </tr>
      </thead>
      <tbody>
      <% admins.forEach(function (admin){ %>
      <tr>
        <td>
          <% if(isAdmin){ %>
          <a href="/admin/detail/<%= admin.id %>">
            <%= admin.name %></a>
          <% }else{ %>
          <a href="/engineers/<%= admin.id %>">
            <%= admin.name %></a>
          <% } %>
        </td>
        <td><%= admin.typeName %></td>
        <td><a href="mailto:<%= admin.email %>"><%= admin.email %></a></td>
        <td>
          <a href="http://wpa.qq.com/msgrd?v=3&uin=<%= admin.qq %>&site=qq&menu=yes"><span class="qq-image"></span></a>
        </td>
      </tr>
      <% }); %>
      </tbody>
    </table>

  </div>
  <!-- .col-md-9 -->
</div>
<!-- .row -->
